<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<html>
	<head>
		<title>修改申请要求</title>
		<script type="text/javascript">		
			$(document).ready(function(){
				$("#materialInfoForm").validationEngine({
					promptPosition : "topLeft",
					ajaxFormValidation: true,
					onAjaxFormComplete: function (status, form, json, options){
						if (json === 1) {
							art.dialog.tips("<label class='success'>修改成功！</label>", 1);
			        		$("button").attr("disabled", true);
							window.parent.location.reload();
						}else{
							art.dialog.tips("<label class='error'>修改失败，请刷新页面重试！</label>", 1);
						}
					}
				});
			});
		</script>
	</head>
	<body>
		<div class="container_16">
			<div class="grid_16">
				<div class="content_top">
					<span>修改申请要求</span>
				</div>
				<div class="content_bottom">	
					<form id="materialInfoForm" action="${ctx }/editMaterialInfo.html" method="post">
						<input type="hidden" id="id" name="id" value="${materialInfo.id }" />
						<table cellpadding="0" cellspacing="0" style="margin-left: 60px; width: 350px;">
							<tr>
								<td>
									<label>
										TOEFL最低分数：
									</label>
								</td>
								<td>
									<input type="text" id="toefl" name="materialInfoTemp.toefl" value="${materialInfo.toefl }" class="input_100" />
								</td>
							</tr>
							<c:choose>
								<c:when test="${materialInfo.material.applyDegree eq 1 }">
									<tr>
										<td>
											<label>
												SAT最低分数：
											</label>
										</td>
										<td>
											<input type="text" id="sat" name="materialInfoTemp.sat" value="${materialInfo.sat }"  class="input_100" />
										</td>
									</tr>
								</c:when>
								<c:otherwise>
									<tr>
										<td>
											<label>
												GRE最低分数：
											</label>
										</td>
										<td>
											<input type="text" id="gre" name="materialInfoTemp.gre" value="${materialInfo.gre }"  class="input_100" />
										</td>
									</tr>
								</c:otherwise>
							</c:choose>
							<tr>
								<td>
									<label>
										个人陈述：
									</label>
								</td>
								<td>
									<input type="text" id="ps" name="materialInfoTemp.ps" value="${materialInfo.ps }"  class="input_100" />
									<label>篇</label>
								</td>
							</tr>
							<tr>
								<td>
									<label>
										简历：
									</label>
								</td>
								<td>
									<input type="text" id="cv" name="materialInfoTemp.cv" value="${materialInfo.cv }"  class="input_100" />
									<label>篇</label>
								</td>
							</tr>
							<tr>
								<td>
									<label>
										推荐信：
									</label>
								</td>
								<td>
									<input type="text" id="rl" name="materialInfoTemp.rl" value="${materialInfo.rl }"  class="input_100" />
									<label>篇</label>
								</td>
							</tr>
							<tr>
								<td>
									<label>
										论文：
									</label>
								</td>
								<td>
									<input type="text" id="essay" name="materialInfoTemp.essay" value="${materialInfo.essay }"  class="input_100" />
									<label>篇</label>
								</td>
							</tr>
							<tr>
								<td>
									<label>
										申请截止日期：
									</label>
								</td>
								<td>
									<input type="text" id="applyEndTime" name="materialInfoTemp.applyEndTime" value="${materialInfo.applyEndTime }"  class="validate[custom[date]] input" />
									<script>										        
										datePickerController.createDatePicker({ 
										    formElements:{"applyEndTime":"%Y-%m-%d"}
									    });
								    </script>
								</td>
							</tr>
							<tr>
								<td>
									<label>
										申请提交网址：
									</label>
								</td>
								<td>
									<input type="text" id="applyUrl" name="materialInfoTemp.applyUrl" value="${materialInfo.applyUrl }"  class="input" />
								</td>
							</tr>
							<tr>
								<td>
									<label>
										申请费用：
									</label>
								</td>
								<td>
									<input type="text" id="applyCost" name="materialInfoTemp.applyCost" value="${materialInfo.applyCost }"  class="input_100" />
								</td>
							</tr>
							<tr>
								<td>
									<label>
										材料寄送日期：
									</label>
								</td>
								<td>
									<input type="text" id="sendTime" name="materialInfoTemp.sendTime" value="${materialInfo.sendTime }"  class="validate[custom[date]] input" />
									<script>										        
										datePickerController.createDatePicker({ 
										    formElements:{"sendTime":"%Y-%m-%d"}
									    });
								    </script>
								</td>
							</tr>
							<tr>
								<td>
									<label>
										材料寄送地址：
									</label>
								</td>
								<td>
									<input type="text" id="sendAddress" name="materialInfoTemp.sendAddress" value="${materialInfo.sendAddress }"  class="input" />
								</td>
							</tr>
							<tr>
								<td>
									&nbsp;
								</td>
								<td>
									<label class="btn">
										<input type="submit" value="修改" />
									</label>
								</td>
							</tr>
						</table>
					</form>
				</div>
			</div>		
		</div>
	</body>
</html>
